package com.qijian.maindata.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;
import com.qijian.common.enums.ApprovalDescriptionEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 物料需求对象 main_line_process_item
 *
 * @author qijian
 * @date 2021-11-10
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("main_line_process_item")
public class LineProcessItem extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "ID")
    private Long demandId;

    /**
     * ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "ID")
    private Long itemId;

    /**
     * 工序
     */
    @Excel(name = "工序")
    @ApiModelProperty(value = "工序")
    private String processCode;

    /**
     * 线路ID
     */
    @Excel(name = "线路ID")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "线路ID")
    private Long lineId;

    /**
     * 线路编码
     */
    @Excel(name = "线路编码")
    @ApiModelProperty(value = "线路编码")
    private String lineCode;

    /**
     * 物料编码
     */
    @Excel(name = "物料编码")
    @ApiModelProperty(value = "物料编码")
    private String itemCode;

    /**
     * 物料名称
     */
    @Excel(name = "物料名称")
    @ApiModelProperty(value = "物料名称")
    private String itemName;

    /**
     * 工序ID
     */
    @Excel(name = "工序ID")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "工序ID")
    private Long processId;

    /**
     * 物料单位
     */
    @Excel(name = "物料单位")
    @ApiModelProperty(value = "物料单位")
    private String itemUnits;

    /**
     * BOM
     */
    @Excel(name = "BOM")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "BOM")
    private Long bomId;

    /**
     * 数量
     */
    @Excel(name = "数量")
    @ApiModelProperty(value = "数量")
    private BigDecimal quantity;

    /**
     * 备注
     */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "审核时间")
    private Date approvalTime;

    /**
     * 制作人ID
     */
    @Excel(name = "制作人ID")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "制作人ID")
    private Long producerId;

    /**
     * 审核者
     */
    @Excel(name = "审核者")
    @ApiModelProperty(value = "审核者")
    private String approvalBy;

    /**
     * 审核状态
     */
    @Excel(name = "审核状态")
    @ApiModelProperty(value = "审核状态")
    private ApprovalDescriptionEnum approvalStatus;

    /**
     * 制作人
     */
    @Excel(name = "制作人")
    @ApiModelProperty(value = "制作人")
    private String producerName;
}
